package com.ruoyi.system.service;

import java.util.List;
import com.ruoyi.system.domain.CommunityUnit;
import com.ruoyi.system.domain.vo.UnitVo;

/**
 * unitService接口
 * 
 * @author hanpee
 * @date 2024-03-25
 */
public interface ICommunityUnitService 
{
    /**
     * 查询unit
     * 
     * @param id unit主键
     * @return unit
     */
    public CommunityUnit selectCommunityUnitById(Long id);

    /**
     * 查询unit列表
     * 
     * @param communityUnit unit
     * @return unit集合
     */
    public List<CommunityUnit> selectCommunityUnitList(CommunityUnit communityUnit);

    /**
     * 新增unit
     * 
     * @param communityUnit unit
     * @return 结果
     */
    public int insertCommunityUnit(CommunityUnit communityUnit) throws Exception;

    /**
     * 修改unit
     * 
     * @param communityUnit unit
     * @return 结果
     */
    public int updateCommunityUnit(CommunityUnit communityUnit);

    /**
     * 批量删除unit
     * 
     * @param ids 需要删除的unit主键集合
     * @return 结果
     */
    public int deleteCommunityUnitByIds(Long[] ids);

    /**
     * 删除unit信息
     * 
     * @param id unit主键
     * @return 结果
     */
    public int deleteCommunityUnitById(Long id) throws Exception;

    /**
     * 单元名称重复校验
     */
    public UnitVo getByName(String name);

    /**
     * 查询所有单元
     * @return List集合
     */
    List<CommunityUnit> listUnit();

    /**
     * 级联删除
     * @param id 单元Id
     * @return boolean
     */
    public boolean watchParams(Long id);
}
